<?php
include ("header2.php");
 include('databaseconnection.php');
 $query = "SELECT * FROM terms WHERE term LIKE 'r%' or term LIKE 'R%'";   
$result = mysql_query($query);

if (mysql_num_rows($result) >= 1) 
  {
  
echo   "<table width='100%' height='82' border='1' class='table' align='left'>
<tr bgcolor='#FFFFFF'>
<th >Term</th>
<th>Domain</th>
<th>Accepted Meaning</th>
<th>Language</th>



<th>Votes</th>

<th>Likes</th>

<th>Add Suggestion/Comment</th>


</tr>";
while($row=mysql_fetch_array($result))
{

echo "<form action='moredetails.php' method='POST'>";
echo "<tr>";
echo "<td width='20%'>".$row['term']."</td>";
$term=$row['term'];
echo "<td width='15%'>".$row['domain']."<input type='hidden' name='butt' value='$term'</td></td>";
$acc_mean=$row['accepted_meaning'];
echo "<td width='35%'>".$row['accepted_meaning']."<input type='hidden' name='butt1' value='$acc_mean'</td>";
echo "<td width='15%'>".$row['language']."</td>";


echo "<td width='7%'>".$row['votes']."</td>";
//echo "<td width='28%'>".$row['comments']."</td>";
echo "<td width='3%'><a href='home2.php'>like</a></td>";
//echo "<td width='10%'><textarea rows='1' cols='9' name='comm'></textarea><input type='submit' name='$term' value='update comment'/><input type='hidden' name='butt' value='$term'</td>";
//echo "<td width='10%'><textarea rows='1' cols='9' name='addsugg'></textarea><input type='submit' name='$term' value='add suggestion'/><input type='hidden' name='butt' value='$term'</td>";
echo "<td width='5%'><input type='submit' name='$term' value='more'/>";


echo "</tr>";
echo "</form>";
}

echo "</table>";     
} 
else
{  
 echo   "<table width='960px' height='82' border='1' class='table' align='left'>";
   echo "<tr><td>No results for your search</td></tr>";
   echo "</table>";  
}   

include ('footer.php');
?>




